package MianShi.hash;



import java.nio.LongBuffer;
import java.util.HashSet;

/**
 * @author wys
 * created in 1:13 2019/3/5
 * HashCode_Override_Equals_Override
 *
 */
public class HashCode_Override_Equals_Override {


    // 封装类型  自动装箱，拆箱   慎用装修类型，会有性能损耗=>因为需要装修、拆箱
    // 用对象类型  好处是当数值没有的时候，也可以返回Integer  只不过是空指针对象
    public static void main(String args[]) {

        int i = 0;
//        System.out.println("i = " + i);

        Integer integer = new Integer(1);
        Double aDouble = new Double(23);
        Long aLong = new Long(232);
        String string = new String();
        StringBuilder stringBuilder = new StringBuilder();
        StringBuffer stringBuffer = new StringBuffer();

        Boolean aBoolean = new Boolean(true);

        String strString = "hello";
        String strString2 = "hello";
        String str1 = new String("hello");
        String str2 = new String("hello");



//        if (strString == strString2) {
//            System.out.println(" strString == str2 ");
//        }
        if (strString.equals(strString)) {
            System.out.println("str2 = ");
        }

        HashSet<Object> objects = new HashSet<>();




    }




}
